package com.jxw.domain;

import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/* loaded from: classes.dex */
public class StudyRecord {
    public String duration;
    public String enterTime;
    public String exitTime;
    public String name;
    public int type;

    public StudyRecord(String str, String str2, String str3, String str4, int i) {
        this.name = str;
        this.enterTime = str2;
        this.exitTime = str3;
        this.duration = str4;
        this.type = i;
    }

    public StudyRecord() {
    }

    public String getName() {
        return this.name;
    }

    public void setName(String str) {
        this.name = str;
    }

    public String getEnterTime() {
        return this.enterTime;
    }

    public void setEnterTime(String str) {
        this.enterTime = str;
    }

    public String getExitTime() {
        return this.exitTime;
    }

    public void setExitTime(String str) {
        this.exitTime = str;
    }

    public String getDuration() {
        return this.duration;
    }

    public void setDuration(String str) {
        this.duration = str;
    }

    public int getType() {
        return this.type;
    }

    public void setType(int i) {
        this.type = i;
    }

    private static String covertTime(long j, String str) {
        return new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.getDefault()).format(new Date(j));
    }

    private static Timestamp string2Timestamp(String str, String str2) {
        Date date;
        try {
            date = new SimpleDateFormat(str2, Locale.getDefault()).parse(str.replace("Z", " "));
        } catch (ParseException e) {
            e.printStackTrace();
            date = null;
        }
        if (date != null) {
            return Timestamp.valueOf(new SimpleDateFormat(str2, Locale.getDefault()).format(date));
        }
        return null;
    }

    private static int subTimeStamp2Minute(Timestamp timestamp, Timestamp timestamp2) {
        return ((int) (timestamp2.getTime() - timestamp.getTime())) / 60000;
    }

    public String toString() {
        return "StudyRecord [name=" + this.name + ", enterTime=" + this.enterTime + ", exitTime=" + this.exitTime + ", duration=" + this.duration + ", type=" + this.type + "]";
    }
}
